<?php

    namespace App\Http\Controllers\Admin\Auth;

    use App\Http\Controllers\Controller;
    use Illuminate\Foundation\Auth\AuthenticatesUsers;
    use Illuminate\Http\Request;
    use Illuminate\Support\Facades\Auth;
    use Illuminate\Support\Facades\Redirect;

    class LoginController extends Controller
    {
        use AuthenticatesUsers;


        protected $redirectTo = '/admin_user';
        public function __construct()
        {
//            $this->middleware('guest:admin', ['except' => 'logout']);
        }


        public function reg()
        {
        }

        public function guard()
        {
            return Auth::guard('admin');
        }

        public function username()
        {
            return 'name';
        }

        public function showLoginForm()
        {
//            dd($user = Auth::guard('admin'));
            return view('admin.auth.login');
        }
    }